package com.mali.common.db.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.Getter;

import static com.mali.common.util.RoleConstant.*;

@Getter
public enum RoleEnum {
    USER(ROLE_USER_CODE, ROLE_USER),
    ADMIN(ROLE_ADMIN_CODE, ROLE_ADMIN),
    SUPER_ADMIN(ROLE_SUPER_ADMIN_CODE, ROLE_SUPER_ADMIN);

    @EnumValue
    private final Integer code;
    private final String role;

    RoleEnum(Integer code, String role){
        this.code = code;
        this.role = role;
    }
}
